<%-- 
    Document   : register
    Created on : Oct 26, 2012, 7:05:45 PM
    Author     : chickencake1
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tlds/RandomCharacters_Tag.tld" prefix="generate" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" type="text/css" href="register-contentJSP.css"/>
        <jsp:useBean id="conf" class="Model.ObjectBean.RequestBean.confirm" scope="request"/>
        
        <script type="text/javascript">
            function isempty(id,valid_id)
            {
                var t=document.getElementById(id).value;
                if(t!="")
                    document.getElementById(valid_id).src="Resources/checked.jpg";
                else
                    document.getElementById(valid_id).src="Resources/unchecked.jpg";
            }
        </script>

        <script>
           function limit_text(limitField,limitNum)
            {
                if(limitField.value.length>limitNum)
                    {
                        limitField.value=limitField.value.substring(0,limitNum);
                    }
            }
        </script>
        
        
    </head>
    <body>
        
        <form  action="registerServlet" method="POST">	
            
            <table class="valid_table">
                <tr>
                    <td id="warning"></td>
                </tr>
                <tr>
                    <td id="username_valid"></td>
                    <td id="city_valid"></td>
                </tr>
                <tr>
                    <td id="password_valid"></td>
                    <td id="phonenumber_valid"></td>
                </tr>
                <tr>
                    <td id="email_valid"></td>
                    <td id="question_valid"></td>
                </tr>
                <tr>
                    <td id="address_valid"></td>
                    <td id="answer_valid"></td>
                </tr>
            </table>
            <table  class="register-table">          
                <tr class="register-title">
                    <td>Ðăng kí</td>
                </tr>
				
				<tr class="register-header">
                                <td></td>
				<td>Các dòng với dấu <small style="color:#FF0000">*</small> là bắt buộc</td>
				</tr>
                                <tr><td></td></tr>
                                
                <tr>
                    <td class="re-normaltext">Tên tài khoản(8-32 kí tự)<small style="color:#FF0000">*</small>: </td>
                    
                    <td class="re-input"><input type="text" name="username"  id="user"
                                                onchange="isempty('user','user_valid_id')"
                                                onblur="isempty('user','user_valid_id')" 
                                                onkeydown="limit_text(user,32)" />
                        <img  src="" id="user_valid_id" height="10px" width="10px" ></td>
                    
					<td class="re-normaltext">Địa chỉ:<small style="color:#FF0000">*</small> </td>
                    <td class="re-input"><input type="text" name="address" id="add" 
                                                onchange="isempty('add','address_valid_id')"
                                                onblur="isempty('add','address_valid_id')"/>
                        <img  src="" id="address_valid_id" height="10px" width="10px" >
                    </td>
                </tr>
				                <tr>
                    <td class="re-normaltext">Mật mã (6-32 kí tự):<small style="color:#FF0000">*</small> </td>
                    <td class="re-input"><input type="password" name="password" /></td>
					<td class="re-normaltext">Số điện thoại:<small style="color:#FF0000">*</small></td>
                    <td class="re-input"><input type="text" name="phonenumber" /></td>
                </tr>
				                <tr>
                    <td class="re-normaltext">Nhập lại mật mã:<small style="color:#FF0000">*</small> </td>
                    <td class="re-input"><input type="password" name="retype-password" /></td>
					<td class="re-normaltext">Thành phố:<small style="color:#FF0000">*</small></td>
                    <td class="re-input">
					<select name="city">
                                        <option value="-1">Chọn thành phố</option>
                                        <option value="HCM">Hồ Chí Minh</option>
                                        <option value="HN">Hà Nội</option>
                                       
					<option value="HP">Hải Phòng</option>
					<option value="DN">Ðà Nẵng</option>
					<option value="CT">Cần Thơ</option>
					<option value="PY">Phú Yên</option>
                	</select></td>
					</td>
                </tr>

				                <tr>
                    <td class="re-normaltext">Email:<small style="color:#FF0000">*</small> </td>
                    <td class="re-input"><input type="text" name="email" /></td>
					<td class="re-normaltext">Ngày sinh:</td>
                                        <td>
                                        <table>
                                           
                 <tr>
                    <td>Tháng</td>
                    <td>Ngày</td>
                    <td>Năm</td>
                </tr>
                                        <tr>
                                        <td><select name="month">
                                                <option value="-1">Chọn tháng</option>
                                                <option value="1">1</option>
                                                <option value="2">2</option>
                                                <option value="3">3</option>
                                                <option value="4">4</option>
                                                <option value="5">5</option>
                                                <option value="6">6</option>
                                                <option value="7">7</option>
                                                <option value="8">8</option>
                                                <option value="9">9</option>
                                                <option value="10">10</option>
                                                <option value="11">11</option>
                                                <option value="12">12</option>
                                            </select></td>
                                            <td class="re-input"><select name="day">
                                                <option value="-1">Chọn ngày</option>
                                                <option value="1">1</option>
                                                <option value="2">2</option>
                                                <option value="3">3</option>
                                                <option value="4">4</option>
                                                <option value="5">5</option>
                                                <option value="6">6</option>
                                                <option value="7">7</option>
                                                <option value="8">8</option>
                                                <option value="9">9</option>
                                                <option value="10">10</option>
                                                <option value="11">11</option>
                                                <option value="12">12</option>
                                                <option value="13">13</option>
                                                <option value="14">14</option>
                                                <option value="15">15</option>
                                                <option value="16">16</option>
                                                <option value="17">17</option>
                                                <option value="18">18</option>
                                                <option value="19">19</option>
                                                <option value="20">20</option>
                                                <option value="22">21</option>
                                                <option value="22">22</option>
                                                <option value="23">23</option>
                                                <option value="24">24</option>
                                                <option value="25">25</option>
                                                <option value="26">26</option>
                                                <option value="27">27</option>
                                                <option value="28">28</option>
                                                <option value="29">29</option>
                                                <option value="30">30</option>
                                                <option value="31">31</option>
                                            </select></td>
                    
                                            <td class="re-input"><input  type="text" name="year"/></td>
                                       </tr>
                                       </table>
                                        </td>
                </tr>
				                <tr>
                    <td class="re-normaltext">Nhập lại Email:<small style="color:#FF0000">*</small> </td>
                    <td class="re-input"><input type="text" name="retype-email" /></td>
					<td class="re-normaltext">Câu hỏi bí mật:<small style="color:#FF0000">*</small></td>
                                        <td class="re-input"><select name="question">
                                                <option value="-1">Chọn câu hỏi</option>
                                                <option>Con vật mà bạn thích nhất?</option>
                                                <option>Người mà bạn yêu nhất?</option>
                                                <option>Bạn ghét ai nhất?</option>
                                                <option>Bạn học trường gì?</option>
                                                <option>Bạn là ai?</option>
                                            </select></td>
                </tr>
				                <tr>
                    <td class="re-normaltext">Tên: </td>
                    <td class="re-input"><input type="text" name="firstname" /></td>
					<td class="re-normaltext">Câu trả lời:<small style="color:#FF0000">*</small></td>
                    <td class="re-input"><input type="text" name="answer" /></td>
                </tr>
				                <tr>
                    <td class="re-normaltext">Họ và tên lót: </td>
                    <td class="re-input"><input type="text" name="lastname" /></td>
	
                    <td class="re-normaltext">Giới tính: </td>
                    <td class="re-input">
					<select name="sex">
                    <option value="-1">Chọn giới tính</option>
                    <option value="1">Nam</option>
                    <option value="0">Nữ</option>
                	</select></td>
                </tr>
                <tr class="register-title">
				<td>Thông tin cho việc thanh toán(không bắt buộc)</td>
				</tr>
				
                <tr>
                    <td class="re-normaltext">Hình thức thanh toán :</td>
					<td class="re-input"><select name="payment_style">
                    <option value="-1">Chọn cách thanh toán</option>
                    <option value="0">Trực tiếp, tại nhà của quí khách</option>
                    <option value="1">Tài khỏan Paypal</option>
                </select>
				</td>
				</tr>
				
				<tr>
				<td class="re-normaltext">Paypal Account:</td>
				<td class="re-input"><input type="text" name="account_ID" /></td>
				<td class="re-normaltext">Postal code:</td>
				<td><input type="text" name="postal_code"/></td>
				</tr>
                        <tr class="register-title">
				<td>Mã xác nhận</td>
                </tr>
                <tr>
                    <td></td>
              
                    <td id="refesh_test"><img id="captcharImg" src="<%= conf.getUrl()%>" height="100px" width="200px"></td>
                                
                </tr>
                <tr>
                    <td></td>
                    <td><input type="text" name="confirm_code" id="test" /></td>
                </tr>
                <tr class="agree">
                   <td></td>
                    <td>Tôi đồng ý với những qui định của gian hàng</td>
                </tr>
                                
                <tr class="agree">
                    <td></td>
                    <td><input class="submitbutton" type="submit" value="Hoàn tất việc đăng kí" name="re-submit"  /></td>
                </tr>
            </table>
                  
        </form>
    </body>
</html>
